.main {
    margin: 0 auto;
    background-color: red;
    padding: 10px;
    height: 500px;
    border: 10px solid white;
    border-style: dotted;
    color: white;
    display: flex;
    justify-content: space-around;
}
.main div {
    background-color: green;
    color: white;
}

.root {
    width: 200px;
    height: 200px;
    align-items: center;
    background-color: yellow;
}

.parent {
    width: 120px;
    height: 120px;
    position: relative;
    background-color: red;
}

.child {
    width: 50px;
    height: 50px;
    margin: auto;
    background-color: green;
    position: absolute;
    top: 50%;
    transform: translateY(-25px);
}